package com.example.administrator.privatetest.util;


import android.app.Activity;

import com.example.administrator.privatetest.R;

import java.util.HashMap;
import java.util.Map;

public class Globals {
    public static int SCREEN_WIDTH;
    public static int SCREEN_HEIGHT;

    public static Map<String ,Integer> images;

    public static void init(Activity a){
        //获取手机屏幕的宽和高
        SCREEN_WIDTH = a.getWindowManager().getDefaultDisplay().getWidth();
        SCREEN_HEIGHT = a.getWindowManager().getDefaultDisplay().getHeight();

        //初始化images集合
        images = new HashMap<>();
        images.put("close_dir", R.drawable.close_dir);
        images.put("open_dir", R.drawable.open_dir);
        images.put("mp3", R.drawable.mp3_file);
        images.put("mp4", R.drawable.mp4_file);
        images.put("txt", R.drawable.txt_file);
        images.put("jpg", R.drawable.image_file);
        images.put("bmp", R.drawable.image_file);
        images.put("png", R.drawable.image_file);
        images.put("gif", R.drawable.image_file);
    }
}
